/* 全局样式文件 */
@use 'sass:color';
@use './variables.scss' as vars;
@use './transition.scss';
@use './element-ui.scss';

/* 全局样式重置 */
html, body, #app {
  min-height: 100vh;
  height: auto;
  overflow: auto;
  background: linear-gradient(to right, #74ebd5, #9face6);
  margin: 0;
  padding: 0;
  -moz-osx-font-smoothing: grayscale;
  -webkit-font-smoothing: antialiased;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Helvetica, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', Arial, sans-serif;
  color: var(--text-100);
  background-color: var(--bg-100);
}

*,
*:before,
*:after {
  box-sizing: border-box;
}

a,
a:focus,
a:hover {
  color: inherit;
  outline: none;
  text-decoration: none;
}

div:focus {
  outline: none;
}

/* 主内容区域 */
#app {
  min-height: 100vh;
  background: transparent;
}

/* 清除浮动 */
.clearfix {
  &:after {
    content: "";
    display: table;
    clear: both;
  }
}

/* 通用卡片样式 */
.app-container {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
  padding-top: 64px !important;
}

.filter-container {
  padding-bottom: 10px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  
  .filter-item {
    margin-right: 10px;
    margin-bottom: 10px;
  }
}

.pagination-container {
  margin-top: 20px;
  display: flex;
  justify-content: center;
}

/* 页面切换过渡效果 */
.fade-enter-active,
.fade-leave-active {
  transition: opacity 0.3s;
}

.fade-enter-from,
.fade-leave-to {
  opacity: 0;
}

/* 滚动条样式 */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-200);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: var(--bg-300);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-200);
}

/* 主题定制 */
.el-button--primary {
  background-color: var(--primary-100) !important;
  border-color: var(--primary-100) !important;
}

.el-button--success {
  background-color: var(--primary-200) !important;
  border-color: var(--primary-200) !important;
}

.el-button--warning {
  background-color: var(--accent-100) !important;
  border-color: var(--accent-100) !important;
}

/* 侧边栏定制 */
.sidebar-container {
  background-color: var(--primary-300) !important;
}

.el-menu {
  background-color: var(--primary-300) !important;
}

.el-sub-menu__title, .el-menu-item {
  &:hover {
    background-color: var(--primary-200) !important;
  }
}

.el-menu-item.is-active {
  background-color: var(--primary-100) !important;
  color: #fff !important;
}

.app-container, #app, .main-container, .app-main {
  padding-top: 30px !important;
}

.el-card,
.dashboard-card,
.stat-card {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
} 